package chaw.android.train.MoreActivities;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import chaw.android.train.MoreActivity;
import chaw.android.train.R;
import chaw.android.util.ServerURL;

public class MoreHelpPrivacyActivity extends Activity{
	private WebView moreHelpWebView;
	private WebViewClient client;
	private ImageView btnBack;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.more_help_privacy);
		
		moreHelpWebView = (WebView) findViewById(R.id.moreHelpPrivacyWebView);
        client = new WebViewClient();
		String url = ServerURL.moreHelpPrivacyWebView;
		
		moreHelpWebView.setWebViewClient(client);
		moreHelpWebView.loadUrl(url);
		moreHelpWebView.getSettings().setJavaScriptEnabled(true);
		
		btnBack = (ImageView) findViewById(R.id.btnBack);
		btnBack.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				MoreActivity parentActivity = (MoreActivity)getParent();
				parentActivity.finishFromChild(MoreHelpPrivacyActivity.this);
			}
		});
	}
	
	@Override
	public void onBackPressed() {
		MoreActivity parentActivity = (MoreActivity)getParent();
		parentActivity.finishFromChild(MoreHelpPrivacyActivity.this);
	}
}
